package com.card323.crpg.item;

import com.card323.crpg.Hero;
import com.card323.crpg.effect.Effect;

public class HealthEffect implements Effect {

	int _health_plus;

	public HealthEffect(int health_plus) {
		_health_plus = health_plus;
	}

	public void affect(Hero _hero) {
		int temp = _hero.get_current_life();
		_hero.set_current_life(_hero.get_current_life() + _health_plus);
		if (_hero.get_current_life() > _hero.get_life()) {
			_hero.set_current_life(_hero.get_life());
		}
		_hero.get_bi().send_message_to_all(_hero.get_name() + "生命值" + temp + "->"
				+ _hero.get_current_life());

	}

	public String get_effect_info() {
		
		return "回复"+_health_plus+"点生命值";
	}

}
